-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation check for :
in Cluster/Index name
#36185
Conversation
Adds a deprecation check for cluster and index names that contain `:`, which is illegal in 7.0.
Pinging @elastic/es-core-features |
@@ -18,7 +18,7 @@ static DeprecationIssue checkShardLimit(ClusterState state) { | |||
int maxShardsInCluster = shardsPerNode * nodeCount; | |||
int currentOpenShards = state.getMetaData().getTotalOpenIndexShards(); | |||
|
|||
if (currentOpenShards >= maxShardsInCluster) { | |||
if (nodeCount != 0 && currentOpenShards >= maxShardsInCluster) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fix for bug that was revealed by the test for the new cluster-level deprecation check, but I sincerely doubt it would ever be hit in practice and I didn't think it was worth its own PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: IMO nodeCount > 0 && ...
reads better, else i am asking myself how this value can ever be negative.
static DeprecationIssue indexNameCheck(IndexMetaData indexMetaData) { | ||
String clusterName = indexMetaData.getIndex().getName(); | ||
if (clusterName.contains(":")) { | ||
return new DeprecationIssue(DeprecationIssue.Level.CRITICAL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there guidance on what is Critical vs. Warning ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe Critical means "if you upgrade without fixing this your cluster will fail", whereas Warning means "you will get some deprecation warnings, and/or behavior probably won't be what you want".
This looks like it should be Critical for the cluster name but Warning for the index name - I'll fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds a deprecation check for cluster and index names that contain
:
,which is illegal in 7.0.
Relates to #36024 and #26247